package icu.javayanglei.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 壁纸
 * </p>
 *
 * @author 杨磊
 * @since 2020-11-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class Wallpaper extends Model<Wallpaper> {

    private static final long serialVersionUID = 1L;

    /**
     * 壁纸 id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 壁纸名称
     */
    private String name;
    /**
     * 大小 单位 字节
     */
    private String size;

    /**
     * 远程地址
     */
    private String remoteUrl;

    /**
     * 本地地址
     */
    private String localUrl;

    /**
     * 下载时间
     */
    private LocalDateTime downloadTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
